var ClubGroup_Hequnrizhi = Item.extend({
    _ccsFileName: res.ClubGroup_Hequnrizhi_json,
    _clubId: null,
    _tableView: null,
    _tableViewList: [],

    initItem: function (clubId) {
        this._clubId = clubId;
        var clubInfo = ClubDataManager.getClubData(this._clubId);
        this._initTableView();
    },
    _initClickListeners: function () {
        this._clickListeners = {
        };
    },
    _initEventListeners: function () {
        this._eventListeners = {};
        this._eventListeners[ClubMsgCode.Feeds] = '_feedsHandler';
    },
    refreshView: function () {
        network.send(2103, {cmd: ClubMsgCode.Feeds, club_id: this._clubId});
    },
    _feedsHandler: function (data) {
        var dialogData = data.arr;
        var validData = [];
        //过滤数据
        var filterCmd = ['AddClubGroup', 'addLog'];
        var dataLen = dialogData.length;
        var tmpData;
        for (var i = 0; i < dataLen; i++){
            tmpData = dialogData[i];
            if (filterCmd.indexOf(tmpData.data.cmd) > -1){
                if (tmpData.data.cmd == filterCmd[0]) {
                    validData.push(tmpData);
                }
                else if(tmpData.data.cmd == filterCmd[1] && tmpData.data.opInfo && tmpData.data.opInfo.uds) {
                    for (var j = 0; j < tmpData.data.opInfo.uds.length; j++){
                        var tmpSingData = deepCopy(tmpData);
                        tmpSingData.data.opedUid = tmpData.data.opInfo.uds[j].uid;
                        tmpSingData.data.opedName = tmpData.data.opInfo.uds[j].name;
                        validData.push(tmpSingData);
                    }
                }
            }
        }
        //处理操作的多个人

        //
        this._tableViewList = validData;
        this._tableView.reloadData();
    },

    /**
     * 初始化TableView
     */
    _initTableView: function () {
        var nodeContent = this._nodeList['nodeContent'];
        var tableViewSize = nodeContent.getContentSize();
        this._tableView = new cc.TableView(this, cc.size(tableViewSize.width, tableViewSize.height));
        this._tableView.setDelegate(this);
        this._tableView.setDirection(cc.SCROLLVIEW_DIRECTION_VERTICAL);
        this._tableView.setVerticalFillOrder(cc.TABLEVIEW_FILL_TOPDOWN);
        nodeContent.addChild(this._tableView);
        this._tableView.setPosition(cc.p(0, 0));
    },
    tableCellAtIndex: function (table, idx) {
        var self = this;
        var cell = table.dequeueCell();
        var node = null;
        if (cell == null) {
            cell = new cc.TableViewCell();
            node = addItem('ClubGroup_Hequnrizhi_Item', cell, this._tableViewList[idx], this._clubId);
            node.setName("itemCell");
        } else {
            node = cell.getChildByName("itemCell");
            node.setData(this._tableViewList[idx]);
        }
        return cell;
    },
    tableCellTouched: function (table, cell) {
    },
    tableCellSizeForIndex: function (table, idx) {
        return cc.size(1016, 125);
    },
    numberOfCellsInTableView: function (table) {
        return this._tableViewList.length;
    },

});